<?php
require_once ("../../src/db/connectdatabase.php");
require_once ("../../src/entitys/Introduct.php");

function getIntro() {
	$con = new ConnectDB();
	
	$tbl = "gioithieu";
	$fn = array('content', 'dateupdate');
	$condetion = array('id' => 'gioithieu');
	return $con -> getvalue($tbl, $fn, $condetion);
}

function updateIntro($intro) {
	$con = new ConnectDB();
	
	$tbl = "gioithieu";
	$fn = array('content' => ($intro -> getContent()), 'dateupdate' => ($intro -> getDateupdate()));
	$condition = array('id' => 'gioithieu');
	return $con -> insert($tbl, $fn, $condition);
}
?>